import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'
// import 'element-plus/theme-chalk/dark/css-vars.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import Toast from "vue-toastification"
import "vue-toastification/dist/index.css"

import '@/assets/iconfont/iconfont.css'
import './main.scss' // 引入全局CSS文件
import { globalProperties } from '@/core/global_properties' //定义全局

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus)
app.use(Toast, {
    transition: "Vue-Toastification__bounce",
    maxToasts: 10,
    newestOnTop: true,
})
app.use(globalProperties)
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}